home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / MTOBJECT.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-27  |  3.5 KB  |  95 lines

  1. #ifndef _MTOBJECT_HPP
  2. #define _MTOBJECT_HPP
  3.  
  4. #include "mtdef.hpp"
  5. #include "mmcomp.hpp"
  6.  
  7. class WStringList;
  8.  
  9. class DTObject;
  10. class MTPropertyDialog;
  11. class MTHashTable;
  12.  
  13. enum MMBitmapSize {
  14.     MMBmpS_Small,       // 16 x 16
  15.     MMBmpS_Medium,      // 24 x 24
  16.     MMBmpS_Large,       // 32 x 32
  17.     MMBmpS_NumSizes,
  18. };
  19.  
  20. class METACLASSDEF MetaObject : public MMComponent {
  21.     public:
  22.         MetaObject( const MMComponentData * data );
  23.         MetaObject();
  24.         MetaObject & operator=( const MetaObject & o );
  25.         virtual ~MetaObject();
  26.  
  27.         virtual WConstantString             GetName() const;
  28.         virtual WString                     GetFullName() const;
  29.         virtual WBool                       GetDerivedFrom( const WString & ) const;
  30.  
  31.         virtual const MMEventList &         EventList() const;
  32.         virtual const MMStyleList &         StyleList() const;
  33.         virtual const MMPropertyList &      PropertyList() const;
  34.         virtual const MMMethodList &        MethodList() const;
  35.         virtual const MMPropertySheetList & PropertySheetList() const;
  36.         virtual const MMPropertyList &      FDXPropertyList() const;
  37.  
  38.         virtual DTObject *              Instantiate() const;
  39.  
  40.         virtual WBool                   GetBitmap( WBitmap & bmp,
  41.                                                 MMBitmapSize size ) const;
  42.         virtual WBool                   GetIcon( WIcon & bmp,
  43.                                                 MMBitmapSize size ) const;
  44.  
  45.         virtual MTPropertyDialog *      CreatePropDialog() const;
  46.  
  47.         virtual WBool                   CreateEventPopupMenu( DTObject *,
  48.                                                               WPopupMenu * ) const;
  49.         virtual const MMComponent *     GetBase() const;
  50.         virtual MetaObject *            GetBaseObject() const;
  51.  
  52.         virtual WStyle                  GetMappedMask() const;
  53.         virtual WStyle                  GetExMappedMask() const;
  54.  
  55.         virtual const MMProperty *      FindProperty( const char * ) const;
  56.         virtual const MMStyle *         FindStyle( const char * ) const;
  57.  
  58.         virtual WUInt                   GetNumMappedProperties() const;
  59.         virtual const MMProperty *      GetMappedProperty( WUInt idx ) const;
  60.  
  61.     private:
  62.         virtual WBool           InitMetaObject();
  63.         void                    InitFindProps();
  64.         friend class            MMComponentLib;
  65.  
  66.     private:
  67.         MetaObject *            _base;
  68.         WConstantString         _name;
  69.         WString *               _fullName;
  70.         WBool                   _initialized;
  71.  
  72.         WBool                   _eventListInit;
  73.         WBool                   _styleListInit;
  74.         WBool                   _propertyListInit;
  75.         WBool                   _methodListInit;
  76.         WBool                   _propertySheetListInit;
  77.         WBool                   _mappedPropertyListInit;
  78.         WBool                   _fdxPropertyListInit;
  79.  
  80.         MMEventList             _eventList;
  81.         MMStyleList             _styleList;
  82.         MMPropertyList          _propertyList;
  83.         MMMethodList            _methodList;
  84.         MMPropertySheetList     _propertySheetList;
  85.  
  86.         MMPropertyList          _mappedProperties;
  87.         MMPropertyList          _fdxProperties;
  88.  
  89.         MTHashTable *           _findProperties;
  90.         MTHashTable *           _findStyles;
  91. };
  92. typedef MetaObject MetaWObject;
  93.  
  94. #endif // _MTOBJECT_HPP
  95.